Scope DiffPanel patch cache keys by theme - #94
Merged
Conversation
- pass a cache scope into `getRenderablePatch` and include resolved theme in DiffPanel cache keys - add a test proving `buildPatchCacheKey` changes when cache scope changes
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
WalkthroughThe changes extend the caching mechanism in diff rendering to support theme-scoped cache keys. The Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
radroid
pushed a commit
to radroid/t3code
that referenced
this pull request
Aug 8, 2026
…dored subtrees Closes two advisories against the desktop app the fork ships. Upstream is still on 41.5.0, so the sync does not deliver this — it is a fork-owned pin that retires itself once upstream passes 41.10.3. - GHSA pingdotgg#94 (high): a sandboxed iframe can bypass the `allow-popups` restriction via the OpenURL navigation path. Fixed in 41.10.3. - GHSA pingdotgg#92 (medium): `ProtocolResponse.url` reuses the default session cache instead of the registering session. Fixed in 41.9.1. Dependabot bumped `apps/desktop/package.json` alone, so `vp install` failed on the frozen lockfile in 40s and CI never reached typecheck. Regenerated `pnpm-lock.yaml` with `pnpm install --lockfile-only`; the diff stays inside the electron tree and nets -37 lines. Also adds `.github/dependabot.yml` (fork-owned; upstream has none) ignoring `.repos/**`, and records the seam-ledger rows the change owes: `apps/desktop/package.json` as row 36, and `pnpm-lock.yaml` grown to risk 12416, now the top row.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DiffPanelpatch parsing to pass a cache scope intobuildPatchCacheKeydiff-panel:light/diff-panel:dark) to avoid cross-theme reusegetRenderablePatchbehavior unchanged aside from configurable cache scopingbuildPatchCacheKeychanges when cache scope changesTesting
apps/web/src/lib/diffRendering.test.tsverifies different cache scopes produce different keysNote
Low Risk
Low risk: changes only adjust diff parsing cache-key scoping to avoid cross-theme reuse, plus a small unit test; no data/auth flows affected.
Overview
DiffPanelnow scopes patch parsing cache keys by the resolved theme (e.g.diff-panel:lightvsdiff-panel:dark) by threading acacheScopeintogetRenderablePatch()andbuildPatchCacheKey()usage, preventing cached diff artifacts from being reused across themes.Adds a unit test ensuring
buildPatchCacheKey()output changes when the provided scope changes.Written by Cursor Bugbot for commit 8a567ba. This will update automatically on new commits. Configure here.
Note
Scope DiffPanel patch cache keys by theme and modify
apps/web/src/components/DiffPanel.tsxto passcacheScopetogetRenderablePatchAdd
cacheScopetogetRenderablePatchand includeresolvedThemein the DiffPanel memo to derive theme-scoped patch cache keys; add a test forbuildPatchCacheKeyscope variance in diffRendering.test.ts.📍Where to Start
Start with the
DiffPaneluseMemoforrenderablePatchin DiffPanel.tsx and then reviewgetRenderablePatchusage ofcacheScope.Macroscope summarized 8a567ba.
Summary by CodeRabbit
Release Notes
Improvements
Tests